/* ***********************
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is createSkeleton.js module.
 *
 * The Initial Developer of the Original Code is Rob Gerns.
 *
 * Portions created by the Initial Developer are Copyright (C) 2010
 * the Initial Developer. All Rights Reserved.
 *
 **************************/
function createSkeleton(){
    /***************************************************
    * Function Name:  createSkeleton 
    *
    * Purpose: Write a few layers that will be used later 
    * to sort features/ads by priority level.
    ****************************************************/
    var objDivAd = "";
    var objDivAd2 = "";
    var objDivAd2Id = "";
    var objDivAd3 = "";
    var objDivAd3Id = "";
    var objDivAdId = "";
    var objDivBegin = "";
    var objDivBeginId = "";
    var objDivContainer = "";
    var objDivContainerId = "";
    var objDivHigh = "";
    var objDivHighest = "";
    var objDivHighestId = "";
    var objDivHighId = "";
    var objDivLow = "";
    var objDivLowest = "";
    var objDivLowestId = "";
    var objDivLowId = "";
    var objDivNormal = "";
    var objDivNormalId = "";
    
    //Create a div to contain absolutely everything that's found in the XML.
    objDivContainer = document.createElement("div");
    objDivContainerId = objDivContainer.id = "container";
    document.body.appendChild(objDivContainer);
    //This div is used as a starting point for the ads and priority divs.
    objDivBegin = document.createElement("div");
    objDivBeginId = objDivBegin.id = "begin";
    objDivContainer.appendChild(objDivBegin);
    //There should only be a maximum of three ads.
    objDivAd = document.createElement("div");
    objDivAdId = objDivAd.id = "advertisement1";
    objDivAd.className = "advertisement";
    objDivContainer.appendChild(objDivAd);
    objDivAd2 = document.createElement("div");
    objDivAd2Id = objDivAd2.id = "advertisement2";
    objDivAd2.className = "advertisement";
    objDivContainer.appendChild(objDivAd2);
    objDivAd3 = document.createElement("div");
    objDivAd3Id = objDivAd3.id = "advertisement3";
    objDivAd3.className = "advertisement";
    objDivContainer.appendChild(objDivAd3);
    //Create divs for the various priority levels.
    objDivHighest = document.createElement("div");
    objDivHighestId = objDivHighest.id = "highest";
    objDivContainer.appendChild(objDivHighest);
    objDivHigh = document.createElement("div");
    objDivHighId = objDivHigh.id = "high";
    objDivContainer.appendChild(objDivHigh);
    objDivNormal = document.createElement("div");
    objDivNormalId = objDivNormal.id = "normal";
    objDivContainer.appendChild(objDivNormal);
    objDivLow = document.createElement("div");
    objDivLowId = objDivLow.id = "low";
    objDivContainer.appendChild(objDivLow);
    objDivLowest = document.createElement("div");
    objDivLowestId = objDivLowest.id = "lowest";
    objDivContainer.appendChild(objDivLowest);
}